package cn.wolfcode.mycat.mapper;

import cn.wolfcode.mycat.domain.Company;
import cn.wolfcode.mycat.domain.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by wolfcode-lanxw
 */
@Mapper
public interface OrderMapper {
    @Insert("INSERT INTO `order` (`company_id`, `no`) VALUES (#{company_id},#{no})")
    int insert(Order order);

    @Select("select * from `order` where company_id=#{companyId}")
    List<Order> selectAll(int companyId);
}
